<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce</title>
<meta name="generator" content="MoxieDoc" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce</h1>
<table class="classDetails">
<tr>
<td class="first">Class</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">Type</td>
<td class="last">Singleton</td>
</tr>
</table>
<div class="classDescription">Core namespace with core functionality for the TinyMCE API all sub classes will be added to this namespace/object.
</div>
<h4>Example</h4>
<pre class="brush: js;">// Using each method
tinymce.each([1, 2, 3], function(v, i) {
  console.log(i + '=' + v);
});

// Checking for a specific browser
if (tinymce.isIE)
  console.log("IE");</pre>
<div class="summaryLists">
<h2>Public Properties</h2>
<table class="Properties summary">
<thead>
<tr>
<th>Property</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isAir">isAir</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the runtime is Adobe Air.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isGecko">isGecko</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the browser is Gecko.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isIE">isIE</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the browser is IE.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isIE6">isIE6</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the browser is IE 6 or older.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isMac">isMac</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the os is Mac OS.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isOpera">isOpera</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the browser is Opera.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#isWebKit">isWebKit</a> : Boolean</div>
<div class="summary">
<span class="static">[static] </span>Constant that is true if the browser is WebKit (Safari/Chrome).</div>
</td>
<td class="last">tinymce</td>
</tr>
</tbody>
</table>
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#addUnload">addUnload</a>(f:function, s:Object):function</div>
<div class="summary">
<span class="static">[static] </span>Adds an unload handler to the document.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#create">create</a>(s:String, o:Object):void</div>
<div class="summary">
<span class="static">[static] </span>Creates a class, subclass or static singleton.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#createNS">createNS</a>(n:String, o:Object):Object</div>
<div class="summary">
<span class="static">[static] </span>Creates a namespace on a specific object.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#each">each</a>(o:Object, cb:function, s:Object):void</div>
<div class="summary">
<span class="static">[static] </span>Performs an iteration of all items in a collection such as an object or array.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#explode">explode</a>(s:string, d:string):void</div>
<div class="summary">
<span class="static">[static] </span>Splits a string but removes the whitespace before and after each value.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#extend">extend</a>(o:Object, e..n:Object):Object</div>
<div class="summary">
<span class="static">[static] </span>Extends an object with the specified other object(s).</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#grep">grep</a>(a:Array, f:function):Array</div>
<div class="summary">
<span class="static">[static] </span>Filters out items from the input array by calling the specified function for each item.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#inArray">inArray</a>(a:Array, v:Object):Number/String</div>
<div class="summary">
<span class="static">[static] </span>Returns the index of a value in an array, this method will return -1 if the item wasn't found.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#is">is</a>(o:Object, t:string):Boolean</div>
<div class="summary">
<span class="static">[static] </span>Checks if a object is of a specific type for example an array.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#map">map</a>(a:Array, f:function):Array</div>
<div class="summary">
<span class="static">[static] </span>Creates a new array by the return value of each iteration function call.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#removeUnload">removeUnload</a>(f:function):function</div>
<div class="summary">
<span class="static">[static] </span>Removes the specified function form the unload handler list.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#resolve">resolve</a>(n:String, o:Object):Object</div>
<div class="summary">
<span class="static">[static] </span>Resolves a string and returns the object from a specific structure.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#trim">trim</a>(s:String):String</div>
<div class="summary">
<span class="static">[static] </span>Removes whitespace from the beginning and end of a string.</div>
</td>
<td class="last">tinymce</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.html#walk">walk</a>(o:Object, f:function, n:String, s:String):void</div>
<div class="summary">
<span class="static">[static] </span>Executed the specified function for each item in a object tree.</div>
</td>
<td class="last">tinymce</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Property details</h2>
<div class="memberDetails" id="isAir">
<h3>isAir<span class="memberType">property</span>
</h3>
<code class="syntax">public static isAir : Boolean</code>
<div class="memberDescription">Constant that is true if the runtime is Adobe Air.
</div>
</div>
<div class="memberDetails" id="isGecko">
<h3>isGecko<span class="memberType">property</span>
</h3>
<code class="syntax">public static isGecko : Boolean</code>
<div class="memberDescription">Constant that is true if the browser is Gecko.
</div>
</div>
<div class="memberDetails" id="isIE">
<h3>isIE<span class="memberType">property</span>
</h3>
<code class="syntax">public static isIE : Boolean</code>
<div class="memberDescription">Constant that is true if the browser is IE.
</div>
</div>
<div class="memberDetails" id="isIE6">
<h3>isIE6<span class="memberType">property</span>
</h3>
<code class="syntax">public static isIE6 : Boolean</code>
<div class="memberDescription">Constant that is true if the browser is IE 6 or older.
</div>
</div>
<div class="memberDetails" id="isMac">
<h3>isMac<span class="memberType">property</span>
</h3>
<code class="syntax">public static isMac : Boolean</code>
<div class="memberDescription">Constant that is true if the os is Mac OS.
</div>
</div>
<div class="memberDetails" id="isOpera">
<h3>isOpera<span class="memberType">property</span>
</h3>
<code class="syntax">public static isOpera : Boolean</code>
<div class="memberDescription">Constant that is true if the browser is Opera.
</div>
</div>
<div class="memberDetails last" id="isWebKit">
<h3>isWebKit<span class="memberType">property</span>
</h3>
<code class="syntax">public static isWebKit : Boolean</code>
<div class="memberDescription">Constant that is true if the browser is WebKit (Safari/Chrome).
</div>
</div>
</div>
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="addUnload">
<h3>addUnload<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function addUnload(f:function, s:Object):function</code>
<div class="memberDescription">Adds an unload handler to the document. This handler will be executed when the document gets unloaded.
This method is useful for dealing with browser memory leaks where it might be vital to remove DOM references etc.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">f:function</td>
<td class="last">Function to execute before the document gets unloaded.</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional scope to execute the function in.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">function - Returns the specified unload handler function.</div>
</div>
<div class="memberDetails" id="create">
<h3>create<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function create(s:String, o:Object):void</code>
<div class="memberDescription">Creates a class, subclass or static singleton.
More details on this method can be found in the Wiki.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">s:String</td>
<td class="last">Class name, inheritage and prefix.</td>
</tr>
<tr>
<td class="first">o:Object</td>
<td class="last">Collection of methods to add to the class.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="createNS">
<h3>createNS<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function createNS(n:String, o:Object):Object</code>
<div class="memberDescription">Creates a namespace on a specific object.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">n:String</td>
<td class="last">Namespace to create for example a.b.c.d.</td>
</tr>
<tr>
<td class="first">o:Object</td>
<td class="last">Optional object to add namespace to, defaults to window.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Object - New namespace object the last item in path.</div>
</div>
<div class="memberDetails" id="each">
<h3>each<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function each(o:Object, cb:function, s:Object):void</code>
<div class="memberDescription">Performs an iteration of all items in a collection such as an object or array. This method will execure the
callback function for each item in the collection, if the callback returns false the iteration will terminate.
The callback has the following format: cb(value, key_or_index).
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">o:Object</td>
<td class="last">Collection to iterate.</td>
</tr>
<tr>
<td class="first">cb:function</td>
<td class="last">Callback function to execute for each item.</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional scope to execute the callback in.</td>
</tr>
</table>
<h4>Example</h4>
<pre class="brush: js;">tinymce.each([1, 2, 3], function(v, i) {
  console.log(i + '=' + v);
});</pre>
</div>
<div class="memberDetails" id="explode">
<h3>explode<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function explode(s:string, d:string):void</code>
<div class="memberDescription">Splits a string but removes the whitespace before and after each value.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">s:string</td>
<td class="last">String to split.</td>
</tr>
<tr>
<td class="first">d:string</td>
<td class="last">Delimiter to split by.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="extend">
<h3>extend<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function extend(o:Object, e..n:Object):Object</code>
<div class="memberDescription">Extends an object with the specified other object(s).
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">o:Object</td>
<td class="last">Object to extend with new items.</td>
</tr>
<tr>
<td class="first">e..n:Object</td>
<td class="last">Object(s) to extend the specified object with.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Object - o New extended object, same reference as the input object.</div>
</div>
<div class="memberDetails" id="grep">
<h3>grep<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function grep(a:Array, f:function):Array</code>
<div class="memberDescription">Filters out items from the input array by calling the specified function for each item.
If the function returns false the item will be excluded if it returns true it will be included.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">a:Array</td>
<td class="last">Array of items to loop though.</td>
</tr>
<tr>
<td class="first">f:function</td>
<td class="last">Function to call for each item. Include/exclude depends on it's return value.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Array - New array with values imported and filtered based in input.</div>
</div>
<div class="memberDetails" id="inArray">
<h3>inArray<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function inArray(a:Array, v:Object):Number/String</code>
<div class="memberDescription">Returns the index of a value in an array, this method will return -1 if the item wasn't found.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">a:Array</td>
<td class="last">Array/Object to search for value in.</td>
</tr>
<tr>
<td class="first">v:Object</td>
<td class="last">Value to check for inside the array.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Number/String - Index of item inside the array inside an object. Or -1 if it wasn't found.</div>
</div>
<div class="memberDetails" id="is">
<h3>is<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function is(o:Object, t:string):Boolean</code>
<div class="memberDescription">Checks if a object is of a specific type for example an array.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">o:Object</td>
<td class="last">Object to check type of.</td>
</tr>
<tr>
<td class="first">t:string</td>
<td class="last">Optional type to check for.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the object is of the specified type.</div>
</div>
<div class="memberDetails" id="map">
<h3>map<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function map(a:Array, f:function):Array</code>
<div class="memberDescription">Creates a new array by the return value of each iteration function call. This enables you to convert
one array list into another.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">a:Array</td>
<td class="last">Array of items to iterate.</td>
</tr>
<tr>
<td class="first">f:function</td>
<td class="last">Function to call for each item. It's return value will be the new value.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Array - Array with new values based on function return values.</div>
</div>
<div class="memberDetails" id="removeUnload">
<h3>removeUnload<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function removeUnload(f:function):function</code>
<div class="memberDescription">Removes the specified function form the unload handler list.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">f:function</td>
<td class="last">Function to remove from unload handler list.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">function - Removed function name or null if it wasn't found.</div>
</div>
<div class="memberDetails" id="resolve">
<h3>resolve<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function resolve(n:String, o:Object):Object</code>
<div class="memberDescription">Resolves a string and returns the object from a specific structure.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">n:String</td>
<td class="last">Path to resolve for example a.b.c.d.</td>
</tr>
<tr>
<td class="first">o:Object</td>
<td class="last">Optional object to search though, defaults to window.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Object - Last object in path or null if it couldn't be resolved.</div>
</div>
<div class="memberDetails" id="trim">
<h3>trim<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function trim(s:String):String</code>
<div class="memberDescription">Removes whitespace from the beginning and end of a string.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">s:String</td>
<td class="last">String to remove whitespace from.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">String - New string with removed whitespace.</div>
</div>
<div class="memberDetails last" id="walk">
<h3>walk<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function walk(o:Object, f:function, n:String, s:String):void</code>
<div class="memberDescription">Executed the specified function for each item in a object tree.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">o:Object</td>
<td class="last">Object tree to walk though.</td>
</tr>
<tr>
<td class="first">f:function</td>
<td class="last">Function to call for each item.</td>
</tr>
<tr>
<td class="first">n:String</td>
<td class="last">Optional name of collection inside the objects to walk for example childNodes.</td>
</tr>
<tr>
<td class="first">s:String</td>
<td class="last">Optional scope to execute the function in.</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
